<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>HelpDesk Administrator</title>
        <meta name="description" content="HelpDesk Application"/>
        <meta name="author" content="C1010I-Group 3-FPT Aptech"/>
        <!-- Make sure the latest version of IE is used -->
        <!--        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>-->

        <!-- Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references -->
        <link rel="shortcut icon" href="../Master/Help desk.ico"/>
        <link rel="helpdesk-icon" href="../Master/img/Helpdesk.png"/>

        <!-- CSS - Setup -->
        <link href="../Master/css/style.css" rel="stylesheet" type="text/css" />
        <link href="../Master/css/grid.css" rel="stylesheet" type="text/css" />
        <!-- CSS - Styles -->
        <link href="../Master/css/base.css" rel="stylesheet" type="text/css" />
        <link href="../Master/css/forms.css" rel="stylesheet" type="text/css" />
        <link href="../Master/css/lists.css" rel="stylesheet" type="text/css" />
        <link href="../Master/css/calendar.css" rel="stylesheet" type="text/css" />
        <link href="../Master/css/extensions.css" rel="stylesheet" type="text/css" />
        <link href="../Master/css/visualize.css" rel="stylesheet" type="text/css" />

        <!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
        <script src="../Master/js/modernizr-1.5.min.js"></script>

    </h:head>
    <h:body class="sidebar-left chart">
        <header>
            <div class="header-top tr">
                <h:form>

                    <h:panelGroup rendered="#{login.customer == null || login.customer.membersRole == 0}">
                        <p>
                            <label style="color: red;margin-top: 3px;">#{login.alert}</label>
                            <h:inputText value="#{login.userName}" title="User" onfocus="clearText(this)" onblur="clearText(this)" />&nbsp;
                            <h:inputSecret value="#{login.password}" title="Password" onblur="clearText(this)" onfocus="clearText(this)" />&nbsp;
                            <h:commandLink action="#{login.loginAdminPage()}" value="Sign in"></h:commandLink>
                        </p>
                    </h:panelGroup>
                    <h:panelGroup rendered="#{login.customer != null}">
                        <h:panelGroup rendered="#{login.customer.membersRole != 0}">

                            <p>Hello <strong>#{login.customer.membersName}</strong> | <a href="../Views/index.xhtml">View Site</a> | <h:commandLink action="#{login.logout()}" value="Log out"></h:commandLink></p>



                        </h:panelGroup>
                    </h:panelGroup>
                </h:form>
            </div>
            <h:panelGroup rendered="#{login.customer != null}">
                <div class="header-middle"> 
                    <!-- Start Nav -->
                    <ul id="nav" class="fr">
                        <!-- Nav - Start Users -->
                        <li class="users"><a class="users" href="members.xhtml">Members</a>
                            <ul>
                                <li><a href="members.xhtml">Manage Members &raquo;</a>
                                    <ul>
                                        <li><a href="addMembers.xhtml">Add Member</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <!-- Nav - End Users --> 
                        <!-- Nav - Start Articles -->
                        <li class="articles"><a class="articles" href="article.xhtml">Articles</a>
                            <ul>
                                <li><a href="article.xhtml">Manage Articles  &raquo;</a>
                                    <ul>
                                        <li><a href="addArticle.xhtml">Add Article</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <!-- Nav - End Articles -->
                        <!-- Nav - Start Solution -->
                        <li class="solutions"><a class="solutions" href="solution.xhtml">Solutions</a>
                            <ul>
                                <li><a href="solution.xhtml">Manage Solutions</a></li>
                            </ul>
                        </li>
                        <!-- Nav - End Solution -->
                        <!-- Nav - Start Categories -->
                        <li class="categories"><a class="categories" href="categories.xhtml">Categories</a>
                            <ul>
                                <li><a href="categories.xhtml">Manage Categories &raquo;</a>
                                    <ul>
                                        <li><a href="addCategory.xhtml">Add Category</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <!-- Nav - End Categories -->
                        <!-- Nav - Start Departments -->
                        <li class="departments"><a class="departments" href="department.xhtml">Departments</a>
                            <ul>
                                <li><a href="department.xhtml">Manage Departments &raquo;</a>
                                    <ul>
                                        <li><a href="addDepartment.xhtml">Add Department</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                        <!-- Nav - End Departments --> 
                        <!-- Nav - Start Complaints -->
                        <li class="complaints"><a class="complaints" href="complaints.xhtml">Complaints</a>
                            <ul>
                                <li><a href="complaints.xhtml">Manage Complaints</a></li>
                                <li><a href="summaryReport.xhtml">Summary Report</a></li>
                                <li><a href="detailedReport.xhtml">Detailed Report</a></li>
                                <li><a href="statusReport.xhtml">Status Report</a></li>
                                <li><a href="departmentReport.xhtml">Department Report</a></li>
                                <li><a href="technicianReport.xhtml">Technician Report</a></li>
                                <li><a href="categoryReport.xhtml">Category Report</a></li>
                            </ul>
                        </li>
                        <!-- Nav - End Complaints -->
                        <!-- Nav - Start Dashboard -->
                        <li class="dashboard"><a class="dashboard" href="index.xhtml">Dashboard</a></li>
                        <!-- Nav - End Dashboard -->
                        <br class="cl" />
                    </ul>
                    <!-- End Nav --> 
                    <!-- Start Logo --> 
                    <img id="logo" src="../Master/img/logo.png" alt="HelpDesk Admin" /> 
                    <!-- End Logo --> 
                    <br class="cl" />
                </div>
            </h:panelGroup>
        </header>

        <h:panelGroup rendered="#{login.customer != null }">
            <div id="page">

                <aside>
                    <!-- Start Live Search  -->
                    <div class="block">
                        <form class="searchform" action="#">
                            <input id="livesearch" type="text" onBlur="if (this.value == '') {this.value = 'Live Search...';}" onFocus="if (this.value == 'Live Search...') {this.value = '';}" value="Live Search..." class="searchfield" />
                        </form>
                    </div>

                    <ul id="sidebar-nav">
                        <li class="complaints" id="complaint1"><a href="#" class="nav-top-item">Complaints</a>
                            <ul class="drop" style="display: block;">
                                <li><a href="complaints.xhtml"><img src="../Master/img/icons/16/page.png"/>Manage Complaints</a></li>
                                <li><a href="summaryReport.xhtml"><img src="../Master/img/icons/16/page_add.png"/>Summary Report</a></li>
                                <li><a href="detailedReport.xhtml"><img src="../Master/img/icons/16/page_edit.png"/>Detailed Report</a></li>
                                <li><a href="statusReport.xhtml"><img src="../Master/img/icons/16/page_edit.png"/>Status Report</a></li>
                                <li><a href="departmentReport.xhtml"><img src="../Master/img/icons/16/page_edit.png"/>Department Report</a></li>
                                <li><a href="technicianReport.xhtml"><img src="../Master/img/icons/16/page_edit.png"/>Technician Report</a></li>
                                <li><a href="categoryReport.xhtml"><img src="../Master/img/icons/16/page_edit.png"/>Category Report</a></li>
                            </ul>
                        </li>
                        <li id="department1"><a href="#" class="nav-top-item">Departments</a>
                            <ul class="drop">
                                <li><a href="department.xhtml"><img src="../Master/img/icons/16/comments.png"/>Manage Departments</a></li>
                                <li><a href="addDepartment.xhtml"><img src="../Master/img/icons/16/image_add.png"/>Add Departments</a></li>
                            </ul>
                        </li>
                        <li id="category1"><a href="#" class="nav-top-item">Categories</a>
                            <ul class="drop">
                                <li><a href="categories.xhtml"><img src="../Master/img/icons/16/comments.png"/>Manage Categories</a></li>
                                <li><a href="addCategory.xhtml"><img src="../Master/img/icons/16/image_add.png"/>Add Category</a></li>
                            </ul>
                        </li>
                        <li id="solution1"><a href="#" class="nav-top-item">Solutions</a>
                            <ul class="drop">
                                <li><a href="solution.xhtml"><img src="../Master/img/icons/16/comments.png"/>Manage Solutions</a></li>
                            </ul>
                        </li>
                        <li id="article1"><a href="#" class="nav-top-item">Articles</a>
                            <ul class="drop">
                                <li><a href="article.xhtml"><img src="../Master/img/icons/16/image_manage.png"/>Manage Articles</a></li>
                                <li><a href="addArticle.xhtml"><img src="../Master/img/icons/16/image_add.png"/>Add Articles</a></li>
                            </ul>
                        </li>
                        <li id="member1"><a href="#" class="nav-top-item">Members</a>
                            <ul class="drop">
                                <li><a href="members.xhtml"><img src="../Master/img/icons/16/user.png"/>Manage Members</a></li>
                                <li><a href="addMembers.xhtml"><img src="../Master/img/icons/16/user_add.png"/>Add Member</a></li>
                            </ul>
                        </li>
                    </ul>

                </aside>

                <div id="page-content" class="container_12"> 
                    <a href="#" id="close_sidebar" class="tooltip east" title="Close Sidebar"> Close Sidebar </a>
                    <a href="#" id="open_sidebar" class="tooltip east" title="Open Sidebar">Open Sidebar</a>
                    <h:panelGroup rendered="#{login.customer != null}">
                        <h:panelGroup rendered="#{login.customer.membersRole != 0}">
                            <ui:insert name="page-content"></ui:insert>
                        </h:panelGroup>
                    </h:panelGroup>

                </div>
                <br class="cl" />
            </div>
        </h:panelGroup>
        <h:panelGroup rendered="#{login.customer != null }">
            <!-- Start Footer -->
            <footer> Copyright ©2012, <a href="">FPT Aptech</a>. </footer>
            <!-- End Footer -->
        </h:panelGroup>
        <!-- Javascript at the bottom for fast page loading --> 
        <script type="text/javascript" src="../Master/js/jsapi.js"></script> 
        <script type="text/javascript" src="../Master/js/jquery-ui-1.8.20.custom.min.js"></script>
        <script type="text/javascript" src="../Master/js/jquery.tipsy.js"></script> 
        <script type="text/javascript" src="../Master/js/jquery.cookie.js"></script> 
        <script type="text/javascript" src="../Master/js/jquery.lightbox-0.5.min.js"></script> 
        <script type="text/javascript" src="../Master/js/jquery.wysiwyg.js"></script>
        <!-- Page specific Javascript --> 
       
        <script type="text/javascript">
            $(function () {
               
                $('#range').hide();
                $('#dates').change(function (){
                    $("#dates option:selected").each(function () {
                        if($(this).html()=="Daily")
                        {
                            $('#daily').show();
                            $('#range').hide();
                           
                        }
                        else{
                         
                            $('#range').show();
                            $('#daily').hide();
                        }
                    });
                })
           
                     
                 
            })
        </script>
        <script type="text/javascript" src="../Master/js/functions.js"></script> 

    </h:body>
</html>